package com.fare.taluo.application.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import com.fare.taluo.core.domain.crawl.statistics.WorkingTaskEntity;

import com.fare.taluo.vo.core.WorkingTaskEntityVo;
import com.fare.taluo.application.WorkingTaskApplicaion;

@Transactional
@Scope("singleton")
@Service("workingTaskApplicaion")
public class WorkingTaskApplicaionImpl implements WorkingTaskApplicaion{

	@Override
	public List<WorkingTaskEntityVo> getWorkingTaskByPage() {
		// TODO Auto-generated method stub
		try {
			WorkingTaskEntity wte = new WorkingTaskEntity();
			List<WorkingTaskEntity> listpo = wte.getWorkingTaskByPage();
			List<WorkingTaskEntityVo>listvo = new ArrayList<WorkingTaskEntityVo>();
			for(WorkingTaskEntity workingTaskEntity : listpo){
				WorkingTaskEntityVo vo = new WorkingTaskEntityVo();
				vo.setGrabchannel(workingTaskEntity.getGrabchannel());
				vo.setInittime(workingTaskEntity.getInittime());
				vo.setRemarks(workingTaskEntity.getRemarks());
				vo.setTaskname(workingTaskEntity.getTaskname());
				listvo.add(vo);
			}
			return listvo;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	
		return null;
	}

}
